package com.ms.oschina.viewholder;

import android.view.View;
import android.widget.TextView;

import com.ms.oschina.R;
import com.ms.oschina.base.BaseViewHolder;
import com.ms.oschina.bean.News;
import com.ms.oschina.util.UiUtils;

public class NewsDetailTitleViewHoder extends BaseViewHolder {
	private TextView tvDetailsTitle;
	private TextView tvDetailsPublishTime;
	private TextView tvDetailsAuthor;
	private View view;

	@Override
	public View initView() {
		view = UiUtils.inflate(R.layout.fragment_newsdetail_title);
		findViews(view);
		return view;
	}

	public void setData(String author, String publishTime, String title) {
		tvDetailsAuthor.setText(author);
		tvDetailsPublishTime.setText(publishTime);
		tvDetailsTitle.setText(title);
	}

	private void findViews(View view) {
		tvDetailsTitle = (TextView) view.findViewById(R.id.tv_details_title);
		tvDetailsPublishTime = (TextView) view.findViewById(R.id.iv_event_time);
		tvDetailsAuthor = (TextView) view.findViewById(R.id.tv_details_author);
	}

}
